import axios from "axios";
import qs from "qs";
import {
  requestUseSucc,
  requestUseError,
  headers,
} from "./common";

const instance = axios.create({
  // baseURL: path,
  timeout: 600000,
  headers: headers,
  paramsSerializer: (params) => qs.stringify(params, { indices: false }),
});
//请求拦截
instance.interceptors.request.use(requestUseSucc, requestUseError);

export default instance